#include <string.h>
#include  <stdio.h>
void fun(char s[]);
main( )
{   char   chrstr[81];
    printf( "\nPlease enter an English text line: " );       gets( chrstr );
    printf( "\n\nBefore changing:\n  %s", chrstr );
    fun(chrstr);
    printf( "\nAfter changing:\n  %s\n", chrstr );
}

void fun(char s[])
//ÇëÔÚÏÂÃæÌîÈë´úÂë£¬²»Òª¸Ä¶¯ÉÏÃæµÄ³ÌÐò
{
	int i=0;
	if(s[0]>='a'&&s[0]<='z')s[0]=s[0]-'a'+'A';
	for(i=0;s[i];i++){
		if(s[i]==' '){
			if(s[i+1]>='a'&&s[i+1]<='z')s[i+1]=s[i+1]-'a'+'A';
		}
	}
}
